package HomeWork.day18zuoye12.timu03;

import java.io.Serializable;

public class Teacher implements Serializable {
  // 实现序列化接口 方便之后序列化对象
  // 序列化对象
  // 反序列化
  // 接口？
  // 封装？
  private String name;
  private int age;
  private double salary;

  // get set

  // 构造器
  // 无参构造器
  public Teacher() {
  }

  // 全参构造器
  public Teacher(String name, int age, double newSalary) {
    // this ?
    this.name = name;
    this.age = age;
    salary = newSalary;
  }

  // @Override? 重写？ 重载？
  @Override
  public String toString() {
    return "[Teacher]@name:" + name + ",age:" + age + ",salary:" + salary;
  }
}